<script>
function searchBarOnClick(){
       textbox=document.getElementById("buscar");
       if(textbox.value=='Buscá un tema'){
               textbox.value='';
       }
       textbox.select();
       textbox.onclick=null;
}
function changeButton() {

	if (document.getElementById('searchButton').src.indexOf('img/searchButton2.png')!= -1) {
		document.getElementById('searchButton').src = "img/searchButton.png";
	}else{
		document.getElementById('searchButton').src = "img/searchButton2.png";
	}
}
</script>

<div class="barraDeBusqueda"><input id="buscar" type="text"
	class="inputBox" onkeyup="if(event.keyCode == 13)buscar();"
	onClick="searchBarOnClick()" onblur="this.onclick=searchBarOnClick"
	value="<?php if (isset($_GET['keyword'])) { echo $_GET['keyword']; }else{ echo 'Buscá un tema';} ?>" /><img
	src="img/searchButton.png" onClick="buscar();" class="searchButton"
	title="Buscar" id="searchButton" onmouseover="changeButton()" onmouseout="changeButton()">

<link rel="stylesheet" type="text/css" href="styles/menu.css" />
<script src="lib/menu/modernizr.custom.js"></script> <script
	src="lib/menu/jquery.dlmenu.js"></script> <script>
			$(function() {
				$( '#dl-menu' ).dlmenu({
					animationClasses : { classin : 'dl-animate-in-1', classout : 'dl-animate-out-1' }
				});
			});
		</script>

<div class="container menuContainer">
<div id="dl-menu" class="dl-menuwrapper">
<button class="dl-trigger" title="Preferencias de búsqueda">Open Menu</button>
<ul class="dl-menu">
	<li><a class="menuItem"><input onClick="checkAll(this.checked); savePreferences();" id="checkboxTodos" type="checkbox">&nbsp;Todos</a></li>

	<li>
	<div style="border: 1px dashed; border-color: rgb(50, 100, 50)"></div>
	</li>

	<li><a class="menuItem">Diarios</a>
	<ul class="dl-submenu">
	<?php
	$property = 'properties/rssFeeds.xml';
	$array_source = simplexml_load_file($property);

	foreach ($array_source as $source){
		if($source->type == "diario"){
			$name = $source->name;
			echo '<li><a class="menuItem"><input onClick="optionClick()" id="checkbox' . $source->shortName . '" type="checkbox">&nbsp;' . $name . '</a></li>';
		}
	}
	?>
	</ul>
	</li>

	<li><a class="menuItem">Portales</a>
	<ul class="dl-submenu">
	<?php
	$property = 'properties/rssFeeds.xml';
	$array_source = simplexml_load_file($property);

	foreach ($array_source as $source){
		if($source->type == "portal"){
			$name = $source->name;
			echo '<li><a class="menuItem"><input onClick="optionClick()" id="checkbox' . $source->shortName . '" type="checkbox">&nbsp;' . $name . '</a></li>';
		}
	}
	?>
	</ul>
	</li>

	<li><a class="menuItem">Provinciales</a>
	<ul class="dl-submenu">
	<?php
	$property = 'properties/rssFeeds.xml';
	$array_source = simplexml_load_file($property);

	foreach ($array_source as $source){
		if($source->type == "provincial"){
			$name = $source->name;
			echo '<li><a class="menuItem"><input onClick="optionClick()" id="checkbox' . $source->shortName . '" type="checkbox">&nbsp;' . $name . '</a></li>';
		}
	}
	?>
	</ul>
	</li>

	<li><a class="menuItem">Internacional</a>
	<ul class="dl-submenu">
	<?php
	$property = 'properties/rssFeeds.xml';
	$array_source = simplexml_load_file($property);

	foreach ($array_source as $source){
		if($source->type == "internacional"){
			$name = $source->name;
			echo '<li><a class="menuItem"><input onClick="optionClick()" id="checkbox' . $source->shortName . '" type="checkbox">&nbsp;' . $name . '</a></li>';
		}
	}
	?>
	</ul>
	</li>

</ul>
</div>
</div>

</div>

